@repometry/cli 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -2
  3. package/package.json +75 -4
  4. package/target/main/resources/language-catalog.json +77 -0
  5. package/target/main/resources/report/json/compact-json-v1.schema.json +24 -0
  6. package/target/main/resources/report/json/comparison-v1.schema.json +65 -0
  7. package/target/main/resources/report/json/config-v2.schema.json +224 -0
  8. package/target/main/resources/report/json/diff-coverage-v1.schema.json +55 -0
  9. package/target/main/resources/report/json/file-metrics-v1.schema.json +157 -0
  10. package/target/main/resources/report/json/metabranch-v1.schema.json +9 -0
  11. package/target/main/resources/report/json/metric-catalog-v1.schema.json +31 -0
  12. package/target/main/resources/report/json/pull-review-v1.schema.json +97 -0
  13. package/target/main/resources/report/json/pull-review-v2.schema.json +100 -0
  14. package/target/main/resources/report/json/report-v2.schema.json +534 -0
  15. package/target/main/resources/report/json/repository-summary-v1.schema.json +341 -0
  16. package/target/main/resources/report/json/viewer-inspection-v1.schema.json +534 -0
  17. package/target/main/resources/viewer/files.css +616 -0
  18. package/target/main/resources/viewer/index.html +120 -0
  19. package/target/main/resources/viewer/projects.html +52 -0
  20. package/target/main/resources/viewer/styles.css +579 -0
  21. package/target/main/resources/viewer/viewer-pulls.css +64 -0
  22. package/target/main/ts/api/cache/root.d.ts +2 -0
  23. package/target/main/ts/api/cache/root.js +21 -0
  24. package/target/main/ts/api/gh/github.d.ts +4 -0
  25. package/target/main/ts/api/gh/github.js +47 -0
  26. package/target/main/ts/api/git/blob-batch.d.ts +10 -0
  27. package/target/main/ts/api/git/blob-batch.js +107 -0
  28. package/target/main/ts/api/git/blob-history.d.ts +20 -0
  29. package/target/main/ts/api/git/blob-history.js +54 -0
  30. package/target/main/ts/api/git/changes.d.ts +27 -0
  31. package/target/main/ts/api/git/changes.js +117 -0
  32. package/target/main/ts/api/git/commit-metadata.d.ts +2 -0
  33. package/target/main/ts/api/git/commit-metadata.js +46 -0
  34. package/target/main/ts/api/git/git-churn.d.ts +9 -0
  35. package/target/main/ts/api/git/git-churn.js +72 -0
  36. package/target/main/ts/api/git/git-executable.d.ts +1 -0
  37. package/target/main/ts/api/git/git-executable.js +31 -0
  38. package/target/main/ts/api/git/git-reader.d.ts +24 -0
  39. package/target/main/ts/api/git/git-reader.js +113 -0
  40. package/target/main/ts/api/git/git.d.ts +47 -0
  41. package/target/main/ts/api/git/git.js +289 -0
  42. package/target/main/ts/api/git/inspection-source.d.ts +17 -0
  43. package/target/main/ts/api/git/inspection-source.js +36 -0
  44. package/target/main/ts/api/git/line-changes.d.ts +6 -0
  45. package/target/main/ts/api/git/line-changes.js +57 -0
  46. package/target/main/ts/api/git/local-sources.d.ts +5 -0
  47. package/target/main/ts/api/git/local-sources.js +48 -0
  48. package/target/main/ts/api/git/local.d.ts +7 -0
  49. package/target/main/ts/api/git/local.js +106 -0
  50. package/target/main/ts/api/git/source-cache.d.ts +1 -0
  51. package/target/main/ts/api/git/source-cache.js +42 -0
  52. package/target/main/ts/api/import/cobertura.d.ts +2 -0
  53. package/target/main/ts/api/import/cobertura.js +160 -0
  54. package/target/main/ts/api/import/coverage-xml.d.ts +7 -0
  55. package/target/main/ts/api/import/coverage-xml.js +135 -0
  56. package/target/main/ts/api/import/finding-import.d.ts +9 -0
  57. package/target/main/ts/api/import/finding-import.js +227 -0
  58. package/target/main/ts/api/import/go-cover.d.ts +13 -0
  59. package/target/main/ts/api/import/go-cover.js +150 -0
  60. package/target/main/ts/api/import/lcov-files.d.ts +12 -0
  61. package/target/main/ts/api/import/lcov-files.js +53 -0
  62. package/target/main/ts/api/import/profile-file.d.ts +4 -0
  63. package/target/main/ts/api/import/profile-file.js +17 -0
  64. package/target/main/ts/api/process/docker-tool-runner.d.ts +13 -0
  65. package/target/main/ts/api/process/docker-tool-runner.js +92 -0
  66. package/target/main/ts/api/process/failure.d.ts +1 -0
  67. package/target/main/ts/api/process/failure.js +12 -0
  68. package/target/main/ts/api/process/plugin.d.ts +13 -0
  69. package/target/main/ts/api/process/plugin.js +100 -0
  70. package/target/main/ts/api/process/tool-snapshot.d.ts +3 -0
  71. package/target/main/ts/api/process/tool-snapshot.js +26 -0
  72. package/target/main/ts/cli/arguments.d.ts +28 -0
  73. package/target/main/ts/cli/arguments.js +109 -0
  74. package/target/main/ts/cli/config.d.ts +63 -0
  75. package/target/main/ts/cli/config.js +165 -0
  76. package/target/main/ts/cli/imports.d.ts +9 -0
  77. package/target/main/ts/cli/imports.js +37 -0
  78. package/target/main/ts/cli/main.d.ts +2 -0
  79. package/target/main/ts/cli/main.js +4 -0
  80. package/target/main/ts/cli/range-inspection.d.ts +38 -0
  81. package/target/main/ts/cli/range-inspection.js +34 -0
  82. package/target/main/ts/cli/range-jobs.d.ts +23 -0
  83. package/target/main/ts/cli/range-jobs.js +152 -0
  84. package/target/main/ts/cli/range-worker.d.ts +1 -0
  85. package/target/main/ts/cli/range-worker.js +40 -0
  86. package/target/main/ts/cli/reporting.d.ts +42 -0
  87. package/target/main/ts/cli/reporting.js +98 -0
  88. package/target/main/ts/cli/revisions.d.ts +6 -0
  89. package/target/main/ts/cli/revisions.js +16 -0
  90. package/target/main/ts/cli/run.d.ts +2 -0
  91. package/target/main/ts/cli/run.js +306 -0
  92. package/target/main/ts/cli/store.d.ts +13 -0
  93. package/target/main/ts/cli/store.js +39 -0
  94. package/target/main/ts/compose/analysis-report.d.ts +6 -0
  95. package/target/main/ts/compose/analysis-report.js +132 -0
  96. package/target/main/ts/compose/analysis-results.d.ts +46 -0
  97. package/target/main/ts/compose/analysis-results.js +119 -0
  98. package/target/main/ts/compose/analysis-steps.d.ts +23 -0
  99. package/target/main/ts/compose/analysis-steps.js +217 -0
  100. package/target/main/ts/compose/analyze-snapshot.d.ts +7 -0
  101. package/target/main/ts/compose/analyze-snapshot.js +21 -0
  102. package/target/main/ts/compose/attach-churn.d.ts +2 -0
  103. package/target/main/ts/compose/attach-churn.js +50 -0
  104. package/target/main/ts/compose/built-ins.d.ts +6 -0
  105. package/target/main/ts/compose/built-ins.js +12 -0
  106. package/target/main/ts/compose/diff-coverage.d.ts +25 -0
  107. package/target/main/ts/compose/diff-coverage.js +82 -0
  108. package/target/main/ts/compose/distribution.d.ts +17 -0
  109. package/target/main/ts/compose/distribution.js +13 -0
  110. package/target/main/ts/compose/docker-image.d.ts +5 -0
  111. package/target/main/ts/compose/docker-image.js +49 -0
  112. package/target/main/ts/compose/file-selection.d.ts +9 -0
  113. package/target/main/ts/compose/file-selection.js +38 -0
  114. package/target/main/ts/compose/history-cache.d.ts +31 -0
  115. package/target/main/ts/compose/history-cache.js +62 -0
  116. package/target/main/ts/compose/inspect.d.ts +34 -0
  117. package/target/main/ts/compose/inspect.js +51 -0
  118. package/target/main/ts/compose/inspection-coverage.d.ts +9 -0
  119. package/target/main/ts/compose/inspection-coverage.js +9 -0
  120. package/target/main/ts/compose/js-plugin.d.ts +113 -0
  121. package/target/main/ts/compose/js-plugin.js +99 -0
  122. package/target/main/ts/compose/language-discovery.d.ts +12 -0
  123. package/target/main/ts/compose/language-discovery.js +51 -0
  124. package/target/main/ts/compose/languages.d.ts +64 -0
  125. package/target/main/ts/compose/languages.js +98 -0
  126. package/target/main/ts/compose/load-plugins.d.ts +6 -0
  127. package/target/main/ts/compose/load-plugins.js +71 -0
  128. package/target/main/ts/compose/parser-order.d.ts +20 -0
  129. package/target/main/ts/compose/parser-order.js +90 -0
  130. package/target/main/ts/compose/phases.d.ts +140 -0
  131. package/target/main/ts/compose/phases.js +147 -0
  132. package/target/main/ts/compose/plugin-list.d.ts +37 -0
  133. package/target/main/ts/compose/plugin-list.js +30 -0
  134. package/target/main/ts/compose/plugin-manifest.d.ts +14 -0
  135. package/target/main/ts/compose/plugin-manifest.js +50 -0
  136. package/target/main/ts/compose/plugin-options.d.ts +2 -0
  137. package/target/main/ts/compose/plugin-options.js +29 -0
  138. package/target/main/ts/compose/plugin-reference.d.ts +9 -0
  139. package/target/main/ts/compose/plugin-reference.js +40 -0
  140. package/target/main/ts/compose/plugin-requirements.d.ts +5 -0
  141. package/target/main/ts/compose/plugin-requirements.js +83 -0
  142. package/target/main/ts/compose/plugin-scope.d.ts +9 -0
  143. package/target/main/ts/compose/plugin-scope.js +60 -0
  144. package/target/main/ts/compose/process-plugins.d.ts +89 -0
  145. package/target/main/ts/compose/process-plugins.js +74 -0
  146. package/target/main/ts/compose/registered-plugin.d.ts +17 -0
  147. package/target/main/ts/compose/registered-plugin.js +8 -0
  148. package/target/main/ts/compose/review.d.ts +26 -0
  149. package/target/main/ts/compose/review.js +54 -0
  150. package/target/main/ts/compose/schema-error.d.ts +2 -0
  151. package/target/main/ts/compose/schema-error.js +16 -0
  152. package/target/main/ts/compose/sources.d.ts +2 -0
  153. package/target/main/ts/compose/sources.js +32 -0
  154. package/target/main/ts/compose/structure-measures.d.ts +9 -0
  155. package/target/main/ts/compose/structure-measures.js +63 -0
  156. package/target/main/ts/index.d.ts +8 -0
  157. package/target/main/ts/index.js +5 -0
  158. package/target/main/ts/plugin.d.ts +2 -0
  159. package/target/main/ts/plugin.js +2 -0
  160. package/target/main/ts/plugins/built-in.d.ts +3 -0
  161. package/target/main/ts/plugins/built-in.js +19 -0
  162. package/target/main/ts/plugins/coverage/coverage.d.ts +11 -0
  163. package/target/main/ts/plugins/coverage/coverage.js +289 -0
  164. package/target/main/ts/plugins/coverage/diff-coverage.d.ts +3 -0
  165. package/target/main/ts/plugins/coverage/diff-coverage.js +85 -0
  166. package/target/main/ts/plugins/duplication/duplication.d.ts +2 -0
  167. package/target/main/ts/plugins/duplication/duplication.js +95 -0
  168. package/target/main/ts/plugins/language-js/babel-provider.d.ts +10 -0
  169. package/target/main/ts/plugins/language-js/babel-provider.js +54 -0
  170. package/target/main/ts/plugins/language-js/clone-candidates.d.ts +3 -0
  171. package/target/main/ts/plugins/language-js/clone-candidates.js +65 -0
  172. package/target/main/ts/plugins/language-js/code-lines.d.ts +6 -0
  173. package/target/main/ts/plugins/language-js/code-lines.js +36 -0
  174. package/target/main/ts/plugins/language-js/extensions.d.ts +1 -0
  175. package/target/main/ts/plugins/language-js/extensions.js +3 -0
  176. package/target/main/ts/plugins/language-js/function-facts.d.ts +9 -0
  177. package/target/main/ts/plugins/language-js/function-facts.js +74 -0
  178. package/target/main/ts/plugins/language-js/js-security.d.ts +4 -0
  179. package/target/main/ts/plugins/language-js/js-security.js +497 -0
  180. package/target/main/ts/plugins/language-js/qualified-names.d.ts +11 -0
  181. package/target/main/ts/plugins/language-js/qualified-names.js +63 -0
  182. package/target/main/ts/plugins/language-js/structural-observations.d.ts +9 -0
  183. package/target/main/ts/plugins/language-js/structural-observations.js +85 -0
  184. package/target/main/ts/plugins/language-js/syntax.d.ts +2 -0
  185. package/target/main/ts/plugins/language-js/syntax.js +11 -0
  186. package/target/main/ts/plugins/maintainability/maintainability.d.ts +2 -0
  187. package/target/main/ts/plugins/maintainability/maintainability.js +38 -0
  188. package/target/main/ts/plugins/maintainability/structural-smells.d.ts +3 -0
  189. package/target/main/ts/plugins/maintainability/structural-smells.js +17 -0
  190. package/target/main/ts/plugins/security/actions-security.d.ts +2 -0
  191. package/target/main/ts/plugins/security/actions-security.js +581 -0
  192. package/target/main/ts/plugins/security/dockerfile.d.ts +2 -0
  193. package/target/main/ts/plugins/security/dockerfile.js +487 -0
  194. package/target/main/ts/plugins/security/npm-supply-chain.d.ts +4 -0
  195. package/target/main/ts/plugins/security/npm-supply-chain.js +368 -0
  196. package/target/main/ts/plugins/security/secrets.d.ts +12 -0
  197. package/target/main/ts/plugins/security/secrets.js +254 -0
  198. package/target/main/ts/plugins/source/forges.d.ts +4 -0
  199. package/target/main/ts/plugins/source/forges.js +80 -0
  200. package/target/main/ts/plugins/structure/structure.d.ts +2 -0
  201. package/target/main/ts/plugins/structure/structure.js +42 -0
  202. package/target/main/ts/report/html/app/viewer-chart-bars.d.ts +13 -0
  203. package/target/main/ts/report/html/app/viewer-chart-bars.js +59 -0
  204. package/target/main/ts/report/html/app/viewer-chart-label.d.ts +15 -0
  205. package/target/main/ts/report/html/app/viewer-chart-label.js +43 -0
  206. package/target/main/ts/report/html/app/viewer-chart-line.d.ts +33 -0
  207. package/target/main/ts/report/html/app/viewer-chart-line.js +88 -0
  208. package/target/main/ts/report/html/app/viewer-chart-points.d.ts +52 -0
  209. package/target/main/ts/report/html/app/viewer-chart-points.js +65 -0
  210. package/target/main/ts/report/html/app/viewer-chart-scale.d.ts +21 -0
  211. package/target/main/ts/report/html/app/viewer-chart-scale.js +93 -0
  212. package/target/main/ts/report/html/app/viewer-chart-svg.d.ts +28 -0
  213. package/target/main/ts/report/html/app/viewer-chart-svg.js +41 -0
  214. package/target/main/ts/report/html/app/viewer-chart-time.d.ts +26 -0
  215. package/target/main/ts/report/html/app/viewer-chart-time.js +150 -0
  216. package/target/main/ts/report/html/app/viewer-chart-tip.d.ts +4 -0
  217. package/target/main/ts/report/html/app/viewer-chart-tip.js +210 -0
  218. package/target/main/ts/report/html/app/viewer-chart-x.d.ts +12 -0
  219. package/target/main/ts/report/html/app/viewer-chart-x.js +50 -0
  220. package/target/main/ts/report/html/app/viewer-chart.d.ts +7 -0
  221. package/target/main/ts/report/html/app/viewer-chart.js +50 -0
  222. package/target/main/ts/report/html/app/viewer-code-map.d.ts +27 -0
  223. package/target/main/ts/report/html/app/viewer-code-map.js +176 -0
  224. package/target/main/ts/report/html/app/viewer-columns.d.ts +40 -0
  225. package/target/main/ts/report/html/app/viewer-columns.js +97 -0
  226. package/target/main/ts/report/html/app/viewer-commit-picker.d.ts +12 -0
  227. package/target/main/ts/report/html/app/viewer-commit-picker.js +229 -0
  228. package/target/main/ts/report/html/app/viewer-commits.d.ts +32 -0
  229. package/target/main/ts/report/html/app/viewer-commits.js +81 -0
  230. package/target/main/ts/report/html/app/viewer-controls.d.ts +43 -0
  231. package/target/main/ts/report/html/app/viewer-controls.js +141 -0
  232. package/target/main/ts/report/html/app/viewer-copy.d.ts +17 -0
  233. package/target/main/ts/report/html/app/viewer-copy.js +64 -0
  234. package/target/main/ts/report/html/app/viewer-data.d.ts +24 -0
  235. package/target/main/ts/report/html/app/viewer-data.js +78 -0
  236. package/target/main/ts/report/html/app/viewer-diagnostics.d.ts +4 -0
  237. package/target/main/ts/report/html/app/viewer-diagnostics.js +60 -0
  238. package/target/main/ts/report/html/app/viewer-dom.d.ts +27 -0
  239. package/target/main/ts/report/html/app/viewer-dom.js +99 -0
  240. package/target/main/ts/report/html/app/viewer-file-aside.d.ts +15 -0
  241. package/target/main/ts/report/html/app/viewer-file-aside.js +134 -0
  242. package/target/main/ts/report/html/app/viewer-file-figures.d.ts +17 -0
  243. package/target/main/ts/report/html/app/viewer-file-figures.js +65 -0
  244. package/target/main/ts/report/html/app/viewer-file-source.d.ts +7 -0
  245. package/target/main/ts/report/html/app/viewer-file-source.js +119 -0
  246. package/target/main/ts/report/html/app/viewer-files.d.ts +11 -0
  247. package/target/main/ts/report/html/app/viewer-files.js +40 -0
  248. package/target/main/ts/report/html/app/viewer-filter.d.ts +65 -0
  249. package/target/main/ts/report/html/app/viewer-filter.js +161 -0
  250. package/target/main/ts/report/html/app/viewer-hotspots.d.ts +4 -0
  251. package/target/main/ts/report/html/app/viewer-hotspots.js +133 -0
  252. package/target/main/ts/report/html/app/viewer-inspection.d.ts +69 -0
  253. package/target/main/ts/report/html/app/viewer-inspection.js +38 -0
  254. package/target/main/ts/report/html/app/viewer-issue-group.d.ts +27 -0
  255. package/target/main/ts/report/html/app/viewer-issue-group.js +174 -0
  256. package/target/main/ts/report/html/app/viewer-issues.d.ts +4 -0
  257. package/target/main/ts/report/html/app/viewer-issues.js +173 -0
  258. package/target/main/ts/report/html/app/viewer-language-bar.d.ts +11 -0
  259. package/target/main/ts/report/html/app/viewer-language-bar.js +76 -0
  260. package/target/main/ts/report/html/app/viewer-languages.d.ts +35 -0
  261. package/target/main/ts/report/html/app/viewer-languages.js +97 -0
  262. package/target/main/ts/report/html/app/viewer-layout.d.ts +14 -0
  263. package/target/main/ts/report/html/app/viewer-layout.js +134 -0
  264. package/target/main/ts/report/html/app/viewer-line-coverage.d.ts +47 -0
  265. package/target/main/ts/report/html/app/viewer-line-coverage.js +108 -0
  266. package/target/main/ts/report/html/app/viewer-locations.d.ts +16 -0
  267. package/target/main/ts/report/html/app/viewer-locations.js +31 -0
  268. package/target/main/ts/report/html/app/viewer-map-scale.d.ts +26 -0
  269. package/target/main/ts/report/html/app/viewer-map-scale.js +147 -0
  270. package/target/main/ts/report/html/app/viewer-map-shape.d.ts +42 -0
  271. package/target/main/ts/report/html/app/viewer-map-shape.js +102 -0
  272. package/target/main/ts/report/html/app/viewer-metric-format.d.ts +23 -0
  273. package/target/main/ts/report/html/app/viewer-metric-format.js +93 -0
  274. package/target/main/ts/report/html/app/viewer-metric-registry.d.ts +47 -0
  275. package/target/main/ts/report/html/app/viewer-metric-registry.js +138 -0
  276. package/target/main/ts/report/html/app/viewer-metrics-view.d.ts +4 -0
  277. package/target/main/ts/report/html/app/viewer-metrics-view.js +159 -0
  278. package/target/main/ts/report/html/app/viewer-metrics.d.ts +51 -0
  279. package/target/main/ts/report/html/app/viewer-metrics.js +195 -0
  280. package/target/main/ts/report/html/app/viewer-overview-cards.d.ts +12 -0
  281. package/target/main/ts/report/html/app/viewer-overview-cards.js +121 -0
  282. package/target/main/ts/report/html/app/viewer-overview-hotspots.d.ts +9 -0
  283. package/target/main/ts/report/html/app/viewer-overview-hotspots.js +173 -0
  284. package/target/main/ts/report/html/app/viewer-overview-lead.d.ts +12 -0
  285. package/target/main/ts/report/html/app/viewer-overview-lead.js +116 -0
  286. package/target/main/ts/report/html/app/viewer-profile-badges.d.ts +11 -0
  287. package/target/main/ts/report/html/app/viewer-profile-badges.js +119 -0
  288. package/target/main/ts/report/html/app/viewer-profile-table.d.ts +29 -0
  289. package/target/main/ts/report/html/app/viewer-profile-table.js +124 -0
  290. package/target/main/ts/report/html/app/viewer-profile.d.ts +13 -0
  291. package/target/main/ts/report/html/app/viewer-profile.js +180 -0
  292. package/target/main/ts/report/html/app/viewer-projects.d.ts +1 -0
  293. package/target/main/ts/report/html/app/viewer-projects.js +90 -0
  294. package/target/main/ts/report/html/app/viewer-pull-sections.d.ts +4 -0
  295. package/target/main/ts/report/html/app/viewer-pull-sections.js +118 -0
  296. package/target/main/ts/report/html/app/viewer-pull-trend.d.ts +5 -0
  297. package/target/main/ts/report/html/app/viewer-pull-trend.js +63 -0
  298. package/target/main/ts/report/html/app/viewer-pulls.d.ts +2 -0
  299. package/target/main/ts/report/html/app/viewer-pulls.js +92 -0
  300. package/target/main/ts/report/html/app/viewer-query-field.d.ts +19 -0
  301. package/target/main/ts/report/html/app/viewer-query-field.js +203 -0
  302. package/target/main/ts/report/html/app/viewer-route.d.ts +34 -0
  303. package/target/main/ts/report/html/app/viewer-route.js +55 -0
  304. package/target/main/ts/report/html/app/viewer-shell.d.ts +20 -0
  305. package/target/main/ts/report/html/app/viewer-shell.js +113 -0
  306. package/target/main/ts/report/html/app/viewer-source-view.d.ts +49 -0
  307. package/target/main/ts/report/html/app/viewer-source-view.js +150 -0
  308. package/target/main/ts/report/html/app/viewer-source.d.ts +27 -0
  309. package/target/main/ts/report/html/app/viewer-source.js +57 -0
  310. package/target/main/ts/report/html/app/viewer-suggest.d.ts +13 -0
  311. package/target/main/ts/report/html/app/viewer-suggest.js +91 -0
  312. package/target/main/ts/report/html/app/viewer-sunburst.d.ts +5 -0
  313. package/target/main/ts/report/html/app/viewer-sunburst.js +40 -0
  314. package/target/main/ts/report/html/app/viewer-table-cells.d.ts +25 -0
  315. package/target/main/ts/report/html/app/viewer-table-cells.js +135 -0
  316. package/target/main/ts/report/html/app/viewer-table-rows.d.ts +56 -0
  317. package/target/main/ts/report/html/app/viewer-table-rows.js +97 -0
  318. package/target/main/ts/report/html/app/viewer-tokenizer.d.ts +15 -0
  319. package/target/main/ts/report/html/app/viewer-tokenizer.js +241 -0
  320. package/target/main/ts/report/html/app/viewer-totals.d.ts +20 -0
  321. package/target/main/ts/report/html/app/viewer-totals.js +100 -0
  322. package/target/main/ts/report/html/app/viewer-treemap.d.ts +24 -0
  323. package/target/main/ts/report/html/app/viewer-treemap.js +112 -0
  324. package/target/main/ts/report/html/app/viewer-trend-data.d.ts +54 -0
  325. package/target/main/ts/report/html/app/viewer-trend-data.js +109 -0
  326. package/target/main/ts/report/html/app/viewer-trend-nav.d.ts +5 -0
  327. package/target/main/ts/report/html/app/viewer-trend-nav.js +86 -0
  328. package/target/main/ts/report/html/app/viewer-trend-points.d.ts +30 -0
  329. package/target/main/ts/report/html/app/viewer-trend-points.js +128 -0
  330. package/target/main/ts/report/html/app/viewer-trend-series.d.ts +32 -0
  331. package/target/main/ts/report/html/app/viewer-trend-series.js +128 -0
  332. package/target/main/ts/report/html/app/viewer-trends.d.ts +5 -0
  333. package/target/main/ts/report/html/app/viewer-trends.js +89 -0
  334. package/target/main/ts/report/html/app/viewer.d.ts +1 -0
  335. package/target/main/ts/report/html/app/viewer.js +222 -0
  336. package/target/main/ts/report/html/site/badges.d.ts +11 -0
  337. package/target/main/ts/report/html/site/badges.js +72 -0
  338. package/target/main/ts/report/html/site/export-site.d.ts +16 -0
  339. package/target/main/ts/report/html/site/export-site.js +129 -0
  340. package/target/main/ts/report/html/site/exported-server.d.ts +6 -0
  341. package/target/main/ts/report/html/site/exported-server.js +72 -0
  342. package/target/main/ts/report/html/site/local-server.d.ts +7 -0
  343. package/target/main/ts/report/html/site/local-server.js +59 -0
  344. package/target/main/ts/report/html/site/projects.d.ts +1 -0
  345. package/target/main/ts/report/html/site/projects.js +69 -0
  346. package/target/main/ts/report/html/site/server.d.ts +4 -0
  347. package/target/main/ts/report/html/site/server.js +65 -0
  348. package/target/main/ts/report/html/site/source-route.d.ts +6 -0
  349. package/target/main/ts/report/html/site/source-route.js +23 -0
  350. package/target/main/ts/report/json/projections/commit-summary.d.ts +13 -0
  351. package/target/main/ts/report/json/projections/commit-summary.js +126 -0
  352. package/target/main/ts/report/json/projections/components.d.ts +4 -0
  353. package/target/main/ts/report/json/projections/components.js +30 -0
  354. package/target/main/ts/report/json/projections/file-metrics.d.ts +4 -0
  355. package/target/main/ts/report/json/projections/file-metrics.js +260 -0
  356. package/target/main/ts/report/json/projections/ignore-view.d.ts +2 -0
  357. package/target/main/ts/report/json/projections/ignore-view.js +13 -0
  358. package/target/main/ts/report/json/projections/inspection-context.d.ts +5 -0
  359. package/target/main/ts/report/json/projections/inspection-context.js +104 -0
  360. package/target/main/ts/report/json/projections/inspection-details.d.ts +14 -0
  361. package/target/main/ts/report/json/projections/inspection-details.js +98 -0
  362. package/target/main/ts/report/json/projections/metric-values.d.ts +14 -0
  363. package/target/main/ts/report/json/projections/metric-values.js +104 -0
  364. package/target/main/ts/report/json/projections/profile-selectors.d.ts +8 -0
  365. package/target/main/ts/report/json/projections/profile-selectors.js +34 -0
  366. package/target/main/ts/report/json/projections/security-summary.d.ts +11 -0
  367. package/target/main/ts/report/json/projections/security-summary.js +22 -0
  368. package/target/main/ts/report/json/store/directory.d.ts +3 -0
  369. package/target/main/ts/report/json/store/directory.js +19 -0
  370. package/target/main/ts/report/json/store/local-store.d.ts +25 -0
  371. package/target/main/ts/report/json/store/local-store.js +214 -0
  372. package/target/main/ts/report/json/store/object-store.d.ts +14 -0
  373. package/target/main/ts/report/json/store/object-store.js +73 -0
  374. package/target/main/ts/report/json/store/operation-cache.d.ts +8 -0
  375. package/target/main/ts/report/json/store/operation-cache.js +32 -0
  376. package/target/main/ts/report/json/store/pull-review-store.d.ts +2 -0
  377. package/target/main/ts/report/json/store/pull-review-store.js +33 -0
  378. package/target/main/ts/report/json/store/replace-file.d.ts +1 -0
  379. package/target/main/ts/report/json/store/replace-file.js +35 -0
  380. package/target/main/ts/report/json/store/report-tree.d.ts +46 -0
  381. package/target/main/ts/report/json/store/report-tree.js +295 -0
  382. package/target/main/ts/report/json/store/store-check.d.ts +32 -0
  383. package/target/main/ts/report/json/store/store-check.js +153 -0
  384. package/target/main/ts/report/json/validation/metabranch.d.ts +4 -0
  385. package/target/main/ts/report/json/validation/metabranch.js +11 -0
  386. package/target/main/ts/report/json/validation/report.d.ts +20 -0
  387. package/target/main/ts/report/json/validation/report.js +82 -0
  388. package/target/main/ts/report/json/validation/summary-validation.d.ts +4 -0
  389. package/target/main/ts/report/json/validation/summary-validation.js +30 -0
  390. package/target/main/ts/report/json/wire/compact-json.d.ts +11 -0
  391. package/target/main/ts/report/json/wire/compact-json.js +76 -0
  392. package/target/main/ts/report/json/wire/component-model.d.ts +9 -0
  393. package/target/main/ts/report/json/wire/component-model.js +1 -0
  394. package/target/main/ts/report/json/wire/domain-types.d.ts +2 -0
  395. package/target/main/ts/report/json/wire/domain-types.js +1 -0
  396. package/target/main/ts/report/json/wire/file-metrics-model.d.ts +81 -0
  397. package/target/main/ts/report/json/wire/file-metrics-model.js +1 -0
  398. package/target/main/ts/report/json/wire/inspection-context-model.d.ts +31 -0
  399. package/target/main/ts/report/json/wire/inspection-context-model.js +1 -0
  400. package/target/main/ts/report/json/wire/inspection-details-model.d.ts +87 -0
  401. package/target/main/ts/report/json/wire/inspection-details-model.js +1 -0
  402. package/target/main/ts/report/json/wire/project-model.d.ts +7 -0
  403. package/target/main/ts/report/json/wire/project-model.js +1 -0
  404. package/target/main/ts/report/json/wire/public-history-model.d.ts +37 -0
  405. package/target/main/ts/report/json/wire/public-history-model.js +5 -0
  406. package/target/main/ts/report/json/wire/pull-review-model.d.ts +54 -0
  407. package/target/main/ts/report/json/wire/pull-review-model.js +3 -0
  408. package/target/main/ts/report/json/wire/summary-model.d.ts +45 -0
  409. package/target/main/ts/report/json/wire/summary-model.js +1 -0
  410. package/target/main/ts/report/markdown/pull-review.d.ts +5 -0
  411. package/target/main/ts/report/markdown/pull-review.js +132 -0
  412. package/target/main/ts/report.d.ts +23 -0
  413. package/target/main/ts/report.js +12 -0
  414. package/target/main/ts/runtime.d.ts +17 -0
  415. package/target/main/ts/runtime.js +30 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Idleware
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/idleware/repometry/master/.github/assets/readme-header-dark.svg">
4
+ <img src="https://raw.githubusercontent.com/idleware/repometry/master/.github/assets/readme-header-light.svg" alt="repometry" width="287" height="48">
5
+ </picture>
6
+ </h1>
2
7
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
8
+ <p align="center">Track repository metrics without SaaS</p>
9
+
10
+ <p align="center">
11
+ <a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/maintainability.svg" alt="Maintainability"></a>
12
+ <a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/coverage.svg" alt="Coverage"></a>
13
+ <a href="https://idleware.github.io/repometry/"><img src="https://idleware.github.io/repometry/security.svg" alt="Security"></a>
14
+ </p>
15
+
16
+ Git can serve as a project’s single source of truth for code, tests, docs, and CI configuration. Repometry lets you keep coverage and maintainability metrics alongside your code, commit by commit.
17
+
18
+ ## Demo
19
+ [https://idleware.github.io/repometry/](https://idleware.github.io/repometry/)
20
+
21
+ ## Requirements
22
+
23
+ Node.js >=24
24
+
25
+ Repometry analyses JavaScript, TypeScript, Go, Python, Java and PHP with no extra tools. Ruby, Kotlin and HCL (Terraform) come with `@repometry/all` or as plugins. See [Languages](docs/native-languages.md). Generating coverage uses your project's own test tools.
26
+
27
+ ## Install
28
+
29
+ ```sh
30
+ # Run without installing.
31
+ npx repometry help
32
+
33
+ # Or install the repometry command.
34
+ npm install --global repometry
35
+ ```
36
+
37
+ ### Which package
38
+
39
+ | Package | Command | Languages | Install size |
40
+ | --- | --- | --- | --- |
41
+ | `@repometry/cli` | `repometry-cli` | JavaScript, TypeScript | about 8 MB |
42
+ | `repometry` | `repometry` | The above, Go, Python, Java, PHP | about 15 MB |
43
+ | `@repometry/all` | `repometry-all` | The above, Ruby, Kotlin, HCL | about 20 MB |
44
+
45
+ To add a language to `@repometry/cli`, install its `@repometry/language-*` package with your package manager and list it in `plugins`. Repometry never installs a plugin. See [Packages](docs/cli.md#packages).
46
+
47
+ ## Usage
48
+
49
+ Run these commands in your repository. Without an install, start each with `npx`.
50
+
51
+ | Command | What it does |
52
+ | --- | --- |
53
+ | `repometry analyze` | Analyze HEAD and save its inspection under `.repometry/`. |
54
+ | `repometry analyze HEAD~50..HEAD --skip-saved` | Build history for the last 50 commits, oldest first, skipping saved inspections. A long range uses every core; `--concurrency N` sets a limit. |
55
+ | `repometry analyze --import lcov=coverage/lcov.info --import sarif=results.sarif` | Import coverage and scanner results. Repeat `--import` for each file. [Commands and configuration](docs/cli.md#analysis-options) lists the formats, such as `cobertura` for `coverage.xml`. |
56
+ | `repometry view` | Open the report locally on a free port. Use `--port 3030` to choose a port. |
57
+ | `repometry report html` | Export a static report to `.repometry/report/html`. Use `repometry report html=DIR` for another folder. |
58
+ | `repometry review origin/main --import lcov=coverage/lcov.info` | Report the issues a change adds or worsens on the lines it changes, and their coverage. |
59
+ | `repometry store check --repair --from git:origin/repometry` | Check saved inspections. `--repair` restores missing data from a copy. |
60
+ | `repometry history` | List saved inspections. `show REVISION` prints one report. See [Reading inspections](docs/store.md#reading-inspections). |
61
+ | `repometry projects DIR` | Build an index page for a folder of exported reports. See [Projects index](docs/cli.md#projects-index). |
62
+ | `repometry plugins` | List the effective plugins and the supported formats. See [The plugins command](docs/cli.md#the-plugins-command). |
63
+ | `repometry help analyze` | Get help for a command. |
64
+
65
+ `repometry.config.json` holds the options that every run shares: exclusions, ignore rules, components, plugins and limits for `review`. See [Configuration](docs/cli.md#configuration). To add a plugin, see [Write a plugin](docs/plugins.md) and [Docker plugins](docs/process-plugins.md).
66
+
67
+ A report shows everything the store holds, so publish it only where you would publish that data.
68
+
69
+ ## License
70
+
71
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,77 @@
1
1
  {
2
2
  "name": "@repometry/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Track repository metrics without SaaS",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/idleware/repometry.git"
9
+ },
10
+ "homepage": "https://github.com/idleware/repometry#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/idleware/repometry/issues"
13
+ },
14
+ "keywords": [
15
+ "repository",
16
+ "metrics",
17
+ "coverage",
18
+ "maintainability",
19
+ "static-analysis"
20
+ ],
21
+ "type": "module",
22
+ "engines": {
23
+ "node": ">=24"
24
+ },
25
+ "bin": {
26
+ "repometry-cli": "target/main/ts/cli/main.js"
27
+ },
28
+ "exports": {
29
+ ".": {
30
+ "types": "./target/main/ts/index.d.ts",
31
+ "default": "./target/main/ts/index.js"
32
+ },
33
+ "./plugin": {
34
+ "types": "./target/main/ts/plugin.d.ts",
35
+ "default": "./target/main/ts/plugin.js"
36
+ },
37
+ "./report": {
38
+ "types": "./target/main/ts/report.d.ts",
39
+ "default": "./target/main/ts/report.js"
40
+ },
41
+ "./internal/api": {
42
+ "types": "./target/main/ts/runtime.d.ts",
43
+ "default": "./target/main/ts/runtime.js"
44
+ },
45
+ "./internal/cli": {
46
+ "types": "./target/main/ts/cli/run.d.ts",
47
+ "default": "./target/main/ts/cli/run.js"
48
+ },
49
+ "./internal/distribution": {
50
+ "types": "./target/main/ts/compose/distribution.d.ts",
51
+ "default": "./target/main/ts/compose/distribution.js"
52
+ }
53
+ },
54
+ "files": [
55
+ "target/main",
56
+ "!target/main/**/*.map"
57
+ ],
58
+ "publishConfig": {
59
+ "access": "public"
60
+ },
61
+ "scripts": {
62
+ "build": "node -e \"require('node:fs').rmSync('target/main', { recursive: true, force: true })\" && tsc -p tsconfig.json && tsc -p tsconfig.browser.json && node -e \"const fs = require('node:fs'); fs.chmodSync('target/main/ts/cli/main.js', 0o755); fs.cpSync('src/main/resources', 'target/main/resources', { recursive: true }); for (const file of ['README.md', 'LICENSE']) fs.cpSync('../../' + file, file)\"",
63
+ "build:test": "npm run build && node -e \"require('node:fs').rmSync('target/verification', { recursive: true, force: true })\" && tsc -p tsconfig.test.json && node -e \"require('node:fs').cpSync('src/main/resources', 'target/verification/main/resources', { recursive: true })\"",
64
+ "test": "npm run build:test && node --test 'target/verification/test/ts/*.test.js'",
65
+ "prepack": "npm run build"
66
+ },
67
+ "dependencies": {
68
+ "@babel/parser": "7.29.15",
69
+ "@babel/types": "7.29.15",
70
+ "@repometry/core": "0.4.0",
71
+ "ajv": "8.20.0",
72
+ "semver": "7.8.6"
73
+ },
74
+ "devDependencies": {
75
+ "@types/semver": "7.8.0"
76
+ }
77
+ }
@@ -0,0 +1,77 @@
1
+ [
2
+ {
3
+ "language": "csharp",
4
+ "label": "C#",
5
+ "package": "@repometry/language-csharp",
6
+ "extensions": [
7
+ ".cs"
8
+ ]
9
+ },
10
+ {
11
+ "language": "go",
12
+ "label": "Go",
13
+ "package": "@repometry/language-go",
14
+ "extensions": [
15
+ ".go"
16
+ ]
17
+ },
18
+ {
19
+ "language": "hcl",
20
+ "label": "HCL",
21
+ "package": "@repometry/language-hcl",
22
+ "extensions": [
23
+ ".tf",
24
+ ".tfvars",
25
+ ".hcl"
26
+ ]
27
+ },
28
+ {
29
+ "language": "java",
30
+ "label": "Java",
31
+ "package": "@repometry/language-java",
32
+ "extensions": [
33
+ ".java"
34
+ ]
35
+ },
36
+ {
37
+ "language": "kotlin",
38
+ "label": "Kotlin",
39
+ "package": "@repometry/language-kotlin",
40
+ "extensions": [
41
+ ".kt",
42
+ ".kts"
43
+ ]
44
+ },
45
+ {
46
+ "language": "lua",
47
+ "label": "Lua",
48
+ "package": "@repometry/language-lua",
49
+ "extensions": [
50
+ ".lua"
51
+ ]
52
+ },
53
+ {
54
+ "language": "php",
55
+ "label": "PHP",
56
+ "package": "@repometry/language-php",
57
+ "extensions": [
58
+ ".php"
59
+ ]
60
+ },
61
+ {
62
+ "language": "python",
63
+ "label": "Python",
64
+ "package": "@repometry/language-python",
65
+ "extensions": [
66
+ ".py"
67
+ ]
68
+ },
69
+ {
70
+ "language": "ruby",
71
+ "label": "Ruby",
72
+ "package": "@repometry/language-ruby",
73
+ "extensions": [
74
+ ".rb"
75
+ ]
76
+ }
77
+ ]
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:repometry:schema:compact-json:1",
4
+ "type": "object",
5
+ "required": ["schema", "strings", "shapes", "data"],
6
+ "properties": {
7
+ "schema": { "const": "urn:repometry:schema:compact-json:1" },
8
+ "summary": { "$ref": "urn:repometry:schema:repository-summary:1#/$defs/commit" },
9
+ "strings": { "type": "array", "items": { "type": "string" } },
10
+ "shapes": { "type": "array", "items": { "type": "array", "uniqueItems": true, "items": { "type": "string" } } },
11
+ "data": { "$ref": "#/$defs/node" }
12
+ },
13
+ "additionalProperties": false,
14
+ "$defs": {
15
+ "node": {
16
+ "anyOf": [
17
+ { "type": "null" },
18
+ { "type": "number" },
19
+ { "type": "boolean" },
20
+ { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/node" } }
21
+ ]
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:repometry:schema:comparison:1",
4
+ "type": "object",
5
+ "required": ["schema", "baseline", "current", "metrics"],
6
+ "properties": {
7
+ "schema": { "const": "urn:repometry:schema:comparison:1" },
8
+ "baseline": { "$ref": "#/$defs/inspection" },
9
+ "current": { "$ref": "#/$defs/inspection" },
10
+ "metrics": {
11
+ "type": "object",
12
+ "required": ["physicalLines", "functions", "maxCyclomaticComplexity", "lineCoverage"],
13
+ "properties": {
14
+ "physicalLines": { "$ref": "#/$defs/metric" },
15
+ "functions": { "$ref": "#/$defs/metric" },
16
+ "maxCyclomaticComplexity": { "$ref": "#/$defs/metric" },
17
+ "lineCoverage": { "$ref": "#/$defs/metric" }
18
+ },
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "additionalProperties": false,
23
+ "$defs": {
24
+ "inspection": {
25
+ "type": "object",
26
+ "required": ["subject", "generatedAt", "status", "scope"],
27
+ "properties": {
28
+ "subject": { "$ref": "urn:repometry:schema:report:2#/$defs/subject" },
29
+ "generatedAt": { "$ref": "urn:repometry:schema:report:2#/properties/generatedAt" },
30
+ "status": { "$ref": "urn:repometry:schema:report:2#/properties/status" },
31
+ "scope": { "$ref": "urn:repometry:schema:report:2#/properties/scope" }
32
+ },
33
+ "additionalProperties": false
34
+ },
35
+ "observation": {
36
+ "type": "object",
37
+ "required": ["status", "value"],
38
+ "properties": {
39
+ "status": { "enum": ["complete", "partial", "not-applicable", "unavailable"] },
40
+ "value": { "type": ["number", "null"], "minimum": 0 },
41
+ "covered": { "$ref": "urn:repometry:schema:report:2#/$defs/count" },
42
+ "total": { "$ref": "urn:repometry:schema:report:2#/$defs/count" }
43
+ },
44
+ "dependentRequired": { "covered": ["total"], "total": ["covered"] },
45
+ "additionalProperties": false
46
+ },
47
+ "metric": {
48
+ "type": "object",
49
+ "required": ["definition", "unit", "baseline", "current", "status", "reason", "delta"],
50
+ "properties": {
51
+ "definition": { "type": "string" },
52
+ "unit": { "enum": ["count", "percent"] },
53
+ "baseline": { "$ref": "#/$defs/observation" },
54
+ "current": { "$ref": "#/$defs/observation" },
55
+ "status": { "enum": ["comparable", "incompatible", "unavailable"] },
56
+ "reason": { "enum": [null, "observations-unavailable", "source-scope-unknown", "source-scope-changed", "method-unknown", "method-changed"] },
57
+ "delta": { "type": ["number", "null"] }
58
+ },
59
+ "if": { "properties": { "status": { "const": "comparable" } } },
60
+ "then": { "properties": { "reason": { "const": null }, "delta": { "type": "number" } } },
61
+ "else": { "properties": { "reason": { "type": "string" }, "delta": { "const": null } } },
62
+ "additionalProperties": false
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,224 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:repometry:schema:config:2",
4
+ "type": "object",
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string"
8
+ },
9
+ "exclude": {
10
+ "$ref": "#/$defs/strings"
11
+ },
12
+ "ignore": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": [
18
+ "reason"
19
+ ],
20
+ "properties": {
21
+ "category": {
22
+ "enum": [
23
+ "maintainability",
24
+ "coverage",
25
+ "security"
26
+ ]
27
+ },
28
+ "plugin": {
29
+ "type": "string",
30
+ "pattern": "^(?=[^\\r\\n\\u0000]*\\S)[^\\r\\n\\u0000]+$"
31
+ },
32
+ "check": {
33
+ "type": "string",
34
+ "pattern": "^(?=[^\\r\\n\\u0000]*\\S)[^\\r\\n\\u0000]+$"
35
+ },
36
+ "path": {
37
+ "anyOf": [
38
+ {
39
+ "type": "string",
40
+ "pattern": "^(?=[^\\r\\n\\u0000]*\\S)[^\\r\\n\\u0000]+$"
41
+ },
42
+ {
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "items": {
46
+ "type": "string",
47
+ "pattern": "^(?=[^\\r\\n\\u0000]*\\S)[^\\r\\n\\u0000]+$"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "reason": {
53
+ "type": "string",
54
+ "pattern": "^(?=[^\\r\\n\\u0000]*\\S)[^\\r\\n\\u0000]+$"
55
+ }
56
+ },
57
+ "anyOf": [
58
+ {
59
+ "required": [
60
+ "category"
61
+ ]
62
+ },
63
+ {
64
+ "required": [
65
+ "plugin"
66
+ ]
67
+ },
68
+ {
69
+ "required": [
70
+ "check"
71
+ ]
72
+ },
73
+ {
74
+ "required": [
75
+ "path"
76
+ ]
77
+ }
78
+ ],
79
+ "allOf": [
80
+ {
81
+ "if": {
82
+ "required": [
83
+ "category"
84
+ ],
85
+ "properties": {
86
+ "category": {
87
+ "const": "coverage"
88
+ }
89
+ }
90
+ },
91
+ "then": {
92
+ "properties": {
93
+ "check": false,
94
+ "plugin": {
95
+ "const": "lcov"
96
+ }
97
+ },
98
+ "required": [
99
+ "path"
100
+ ]
101
+ }
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ "imports": {
107
+ "$ref": "#/$defs/strings"
108
+ },
109
+ "reports": {
110
+ "$ref": "#/$defs/strings"
111
+ },
112
+ "branch": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ },
116
+ "components": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "required": [
121
+ "name",
122
+ "include"
123
+ ],
124
+ "properties": {
125
+ "name": {
126
+ "type": "string",
127
+ "maxLength": 100,
128
+ "pattern": "\\S"
129
+ },
130
+ "description": {
131
+ "type": "string"
132
+ },
133
+ "include": {
134
+ "type": "array",
135
+ "minItems": 1,
136
+ "items": {
137
+ "type": "string",
138
+ "pattern": "^(?![A-Za-z]:)(?:(?!\\.{1,2}(?:/|$))[^/\\\\\\u0000]+/)*(?!\\.{1,2}$)[^/\\\\\\u0000]+$"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ },
144
+ "minCoverage": {
145
+ "type": "number",
146
+ "minimum": 0,
147
+ "maximum": 100
148
+ },
149
+ "minLines": {
150
+ "type": "integer",
151
+ "minimum": 0
152
+ },
153
+ "maxNewIssues": {
154
+ "type": "integer",
155
+ "minimum": 0
156
+ },
157
+ "plugins": {
158
+ "type": "array",
159
+ "items": {
160
+ "$ref": "#/$defs/pluginReference"
161
+ }
162
+ },
163
+ "parsers": {
164
+ "description": "Parser plugin IDs in availability order for each language ID.",
165
+ "type": "object",
166
+ "propertyNames": {
167
+ "pattern": "^[a-z][a-z0-9-]*$"
168
+ },
169
+ "additionalProperties": {
170
+ "type": "array",
171
+ "minItems": 1,
172
+ "uniqueItems": true,
173
+ "items": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ }
177
+ }
178
+ },
179
+ "source": {
180
+ "type": "string",
181
+ "minLength": 1
182
+ }
183
+ },
184
+ "additionalProperties": false,
185
+ "$defs": {
186
+ "strings": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "string",
190
+ "minLength": 1
191
+ }
192
+ },
193
+ "pluginReference": {
194
+ "anyOf": [
195
+ {
196
+ "type": "string",
197
+ "minLength": 1,
198
+ "pattern": "\\S"
199
+ },
200
+ {
201
+ "type": "object",
202
+ "required": [
203
+ "use"
204
+ ],
205
+ "additionalProperties": false,
206
+ "properties": {
207
+ "use": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "pattern": "\\S"
211
+ },
212
+ "options": true,
213
+ "include": {
214
+ "$ref": "#/$defs/strings"
215
+ },
216
+ "exclude": {
217
+ "$ref": "#/$defs/strings"
218
+ }
219
+ }
220
+ }
221
+ ]
222
+ }
223
+ }
224
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:repometry:schema:diff-coverage:1",
4
+ "type": "object",
5
+ "required": ["schema", "requestedBase", "base", "head", "generatedAt", "appliedConfig", "status", "covered", "total", "percent", "files", "gaps", "decision"],
6
+ "properties": {
7
+ "schema": { "const": "urn:repometry:schema:diff-coverage:1" },
8
+ "requestedBase": { "$ref": "#/$defs/sha" },
9
+ "base": { "$ref": "#/$defs/sha" },
10
+ "head": { "$ref": "#/$defs/sha" },
11
+ "generatedAt": { "type": "string" },
12
+ "appliedConfig": { "type": "object", "minProperties": 1 },
13
+ "status": { "enum": ["complete", "partial", "not-applicable"] },
14
+ "covered": { "$ref": "#/$defs/count" },
15
+ "total": { "$ref": "#/$defs/count" },
16
+ "percent": { "anyOf": [{ "$ref": "#/$defs/percent" }, { "type": "null" }] },
17
+ "files": { "type": "array", "items": { "$ref": "#/$defs/file" } },
18
+ "gaps": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "required": ["path", "reason"],
23
+ "properties": { "path": { "type": "string" }, "reason": { "type": "string" } },
24
+ "additionalProperties": false
25
+ }
26
+ },
27
+ "decision": { "anyOf": [{ "$ref": "#/$defs/decision" }, { "type": "null" }] }
28
+ },
29
+ "additionalProperties": false,
30
+ "$defs": {
31
+ "sha": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
32
+ "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
33
+ "percent": { "type": "number", "minimum": 0, "maximum": 100 },
34
+ "file": {
35
+ "type": "object",
36
+ "required": ["path", "addedLines", "covered", "total"],
37
+ "properties": {
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "addedLines": { "$ref": "#/$defs/count" },
40
+ "covered": { "anyOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] },
41
+ "total": { "anyOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] }
42
+ },
43
+ "additionalProperties": false
44
+ },
45
+ "decision": {
46
+ "type": "object",
47
+ "required": ["status", "minimumPercent"],
48
+ "properties": {
49
+ "status": { "enum": ["passed", "failed", "indeterminate", "not-applicable"] },
50
+ "minimumPercent": { "$ref": "#/$defs/percent" }
51
+ },
52
+ "additionalProperties": false
53
+ }
54
+ }
55
+ }